﻿using System;
namespace FishSimulation.Model {
    public class Cord : ModelBase {
        private double _X, _Y;

        public double X {
            get {
                return _X;
            }
            set {
                if (_X != value) {
                    _X = value;
                    this.OnPropertyChanged("X");
                }
            }
        }

        public double Y {
            get {
                return _Y;
            }
            set {
                if (_Y != value) {
                    _Y = value;
                    this.OnPropertyChanged("Y");
                }
            }
        }

        public Cord() { }

        public Cord(double? x, double? y) {
            this.X = x ?? 0;
            this.Y = y ?? 0;
        }

        public override string ToString() {
            return String.Format("X: {0}, Y: {1}", this.X, this.Y);
        }
    }
}
